package com.college.heyuhua.service.impl;

import com.college.heyuhua.dao.BBSInfoMapper;
import com.college.heyuhua.model.BBSInfo;
import com.college.heyuhua.model.BBSInfoSecond;
import com.college.heyuhua.service.IBBSInfoListForPage;
import org.springframework.stereotype.*;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * Created by 赵东坡 on 2019/1/27.
 * Time:11:40
 * 宇宙无敌赵牛逼，祈求永无bug
 */
@Service
@Component
public class BBSInfoListForPageImpl implements IBBSInfoListForPage {

    @Autowired
    private BBSInfoMapper bbsInfoMapper;


    @Override
    public List<BBSInfo> getBBSInfoList(String nid, String type) {
        return bbsInfoMapper.getBBSInfoList(Integer.parseInt(nid),type);
    }

    @Override
    public List<BBSInfoSecond> getBBSInfoListSecond(String nid, String type) {
        return bbsInfoMapper.getBBSInfoListSecond(Integer.parseInt(nid),type);
    }

    @Override
    public boolean insertContent(long nid, String bbscontent, String style, long uid) {
        return bbsInfoMapper.insertContent(nid,bbscontent,style,uid);
    }

}
